package cn.chengdu.service.impl;

import cn.chengdu.entity.Staffinfo;
import cn.chengdu.mapper.StaffinfoMapper;
import cn.chengdu.service.IStaffinfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 医院员工信息表 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-11-25
 */
@Service
public class StaffinfoServiceImpl extends ServiceImpl<StaffinfoMapper, Staffinfo> implements IStaffinfoService {

    @Autowired
    private StaffinfoMapper staffinfoMapper;

   public  List<Staffinfo> getdoctors(int depid){

        return staffinfoMapper.getdoctor(depid);

    }

    @Override
    public int updateSurnum(Staffinfo staffinfo) {
        System.out.println("玉号减一："+staffinfo);
        return staffinfoMapper.updateSurnum(staffinfo);
    }

    @Override
    public int updateSurnum5(Staffinfo staffinfo) {
        System.out.println("设置余浩："+staffinfo);
       return staffinfoMapper.updateSurnum5(staffinfo);
    }

}
